package edu.nf.ch11.pool;

import java.sql.Connection;
import java.sql.DriverManager;

/**
*
* @author CSY
* @date 2025 - 04 - 18
*/public class DbUtil {
    private static final String DB_URL = "jdbc:mysql://localhost:3307/jdbc_test?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai";
    private static final String USER = "root";
    private static final String PASSWORD = "root";

    public static Connection getConnection() {
        try {
            return DriverManager.getConnection(DB_URL, USER, PASSWORD);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
}
